home *** CD-ROM | disk | FTP | other *** search
- property theta, theBottom, theTop
-
- on beginSprite me
- set the cursor of sprite the spriteNum of me to [member "hand", member "Hand Mask"]
- set theta to 45
- set theBottom to the locV of sprite the spriteNum of me + 29
- set theTop to the locV of sprite the spriteNum of me - 211
- end
-
- on endSprite me
- set the cursor of sprite the spriteNum of me to 0
- end
-
- on mouseDown me
- set the cursor of sprite the spriteNum of me to [member "Closed hand", member "Closed Hand Mask"]
- set moved to 0
- repeat while the stillDown
- if (the mouseV >= theTop) and (the mouseV <= theBottom) then
- set moved to 1
- set the locV of sprite the spriteNum of me to the mouseV
- set theta to 360 - integer((the mouseV - theTop) * 1.5)
- put theta into field "theta"
- clear(member "DAngle")
- set endP to VectorToPoint(member "DAngle", 174, 174, theta, 175)
- if the machineType < 256 then
- SetForeColor(member "DAngle", 255, 0, 255)
- DrawFilledWedge(member "DAngle", 142, 144, 208, 210, 0, theta)
- end if
- SetForeColor(member "DAngle", 0, 0, 255)
- DrawSingleArrow(member "DAngle", 174, 174, the locH of endP, the locV of endP)
- Redraw(member "DAngle")
- updateStage()
- end if
- if moved then
- drawLine(15, 207, 206, the locV of endP + 32, the locH of endP + 31)
- updateStage()
- end if
- end repeat
- set the cursor of sprite the spriteNum of me to [member "hand", member "Hand Mask"]
- end
-
- on move me, x
- set the locV of sprite the spriteNum of me to theBottom - integer(theta / 1.5)
- set theta to x
- end
-